package models;

public enum Kind {	
	HandCrews,	
	Engines,	
	Helicopters,
	Personnel,
	Aircraft,
	HeavyEquipment,
	Misc,
	Generic;
	
	public static Kind toKind(String val) {
		if (val == null) {
			return null;
		}
		if (val.equals("Hand Crews")) {
			return HandCrews;
		}
		if (val.equals("Engines")) {
			return Engines;
		}
		if (val.equals("Helicopters")) {
			return Helicopters;
		}
		if (val.equals("Personnel")) {
			return Personnel;
		}
		if (val.equals("Aircraft, Fixed Wing")) {
			return Aircraft;
		}
		if (val.equals("Heavy Equipment")) {
			return HeavyEquipment;
		}
		if (val.equals("Miscellaneous")) {
			return Misc;
		}
		if (val.equals("Generic")) {
			return Generic;
		}
		return null;
	}
	
	public String toDisplayString() {
		switch(this)
		{
		case HandCrews:
			return "Hand Crews"; 
		case Engines:
			return "Engines"; 
		case Helicopters:
			return "Helicopters"; 
		case Personnel:
			return "Personnel"; 
		case Aircraft:
			return "Aircraft, Fixed Wing"; 
		case HeavyEquipment:
			return "Heavy Equipment"; 
		case Misc:
			return "Miscellaneous";
		case Generic:
			return "Generic";
		default:
			return super.toString(); 
		}
	}
}
